3.136 \(\int \csc (e+f x) (a+b \sec ^2(e+f x))^p \, dx\)

Optimal. Leaf size=77 \[ -\frac{\sec (e+f x) \left (a+b \sec ^2(e+f x)\right )^p \left (\frac{b \sec ^2(e+f x)}{a}+1\right )^{-p} F_1\left (\frac{1}{2};1,-p;\frac{3}{2};\sec ^2(e+f x),-\frac{b \sec ^2(e+f x)}{a}\right )}{f} \]

[Out]

-((AppellF1[1/2, 1, -p, 3/2, Sec[e + f*x]^2, -((b*Sec[e + f*x]^2)/a)]*Sec[e + f*x]*(a + b*Sec[e + f*x]^2)^p)/(
f*(1 + (b*Sec[e + f*x]^2)/a)^p))

________________________________________________________________________________________

Rubi [A]  time = 0.077101, antiderivative size = 77, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4134, 430, 429} \[ -\frac{\sec (e+f x) \left (a+b \sec ^2(e+f x)\right )^p \left (\frac{b \sec ^2(e+f x)}{a}+1\right )^{-p} F_1\left (\frac{1}{2};1,-p;\frac{3}{2};\sec ^2(e+f x),-\frac{b \sec ^2(e+f x)}{a}\right )}{f} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]*(a + b*Sec[e + f*x]^2)^p,x]

[Out]

-((AppellF1[1/2, 1, -p, 3/2, Sec[e + f*x]^2, -((b*Sec[e + f*x]^2)/a)]*Sec[e + f*x]*(a + b*Sec[e + f*x]^2)^p)/(
f*(1 + (b*Sec[e + f*x]^2)/a)^p))

Rule 4134

Int[((a_) + (b_.)*((c_.)*sec[(e_.) + (f_.)*(x_)])^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With
[{ff = FreeFactors[Cos[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a + b*(c*ff*x)^
n)^p)/x^(m + 1), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[(m - 1)/2] && (Gt
Q[m, 0] || EqQ[n, 2] || EqQ[n, 4])

Rule 430

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Dist[(a^IntPart[p]*(a + b*x^n)^F
racPart[p])/(1 + (b*x^n)/a)^FracPart[p], Int[(1 + (b*x^n)/a)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n,
p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n, -1] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 429

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
 -q, 1 + 1/n, -((b*x^n)/a), -((d*x^n)/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rubi steps

\begin{align*} \int \csc (e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (a+b x^2\right )^p}{-1+x^2} \, dx,x,\sec (e+f x)\right )}{f}\\ &=\frac{\left (\left (a+b \sec ^2(e+f x)\right )^p \left (1+\frac{b \sec ^2(e+f x)}{a}\right )^{-p}\right ) \operatorname{Subst}\left (\int \frac{\left (1+\frac{b x^2}{a}\right )^p}{-1+x^2} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac{F_1\left (\frac{1}{2};1,-p;\frac{3}{2};\sec ^2(e+f x),-\frac{b \sec ^2(e+f x)}{a}\right ) \sec (e+f x) \left (a+b \sec ^2(e+f x)\right )^p \left (1+\frac{b \sec ^2(e+f x)}{a}\right )^{-p}}{f}\\ \end{align*}

Mathematica [B]  time = 17.1162, size = 1532, normalized size = 19.9 \[ \text{result too large to display} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Csc[e + f*x]*(a + b*Sec[e + f*x]^2)^p,x]

[Out]

((a + 2*b + a*Cos[2*(e + f*x)])^p*Csc[e + f*x]*(Sec[e + f*x]^2)^p*(a + b*Sec[e + f*x]^2)^p*((2*AppellF1[-1/2 -
 p, -1/2, -p, 1/2 - p, -Cot[e + f*x]^2, -(((a + b)*Cot[e + f*x]^2)/b)]*Sqrt[Sec[e + f*x]^2])/((1 + 2*p)*(1 + (
(a + b)*Cot[e + f*x]^2)/b)^p*Sqrt[Csc[e + f*x]^2]) - (AppellF1[1, 1/2, -p, 2, -Tan[e + f*x]^2, -((b*Tan[e + f*
x]^2)/(a + b))]*Tan[e + f*x]^2)/((a + b + b*Tan[e + f*x]^2)/(a + b))^p))/(2*f*(-(a*p*(a + 2*b + a*Cos[2*(e + f
*x)])^(-1 + p)*(Sec[e + f*x]^2)^p*Sin[2*(e + f*x)]*((2*AppellF1[-1/2 - p, -1/2, -p, 1/2 - p, -Cot[e + f*x]^2,
-(((a + b)*Cot[e + f*x]^2)/b)]*Sqrt[Sec[e + f*x]^2])/((1 + 2*p)*(1 + ((a + b)*Cot[e + f*x]^2)/b)^p*Sqrt[Csc[e
+ f*x]^2]) - (AppellF1[1, 1/2, -p, 2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Tan[e + f*x]^2)/((a + b
+ b*Tan[e + f*x]^2)/(a + b))^p)) + p*(a + 2*b + a*Cos[2*(e + f*x)])^p*(Sec[e + f*x]^2)^p*Tan[e + f*x]*((2*Appe
llF1[-1/2 - p, -1/2, -p, 1/2 - p, -Cot[e + f*x]^2, -(((a + b)*Cot[e + f*x]^2)/b)]*Sqrt[Sec[e + f*x]^2])/((1 +
2*p)*(1 + ((a + b)*Cot[e + f*x]^2)/b)^p*Sqrt[Csc[e + f*x]^2]) - (AppellF1[1, 1/2, -p, 2, -Tan[e + f*x]^2, -((b
*Tan[e + f*x]^2)/(a + b))]*Tan[e + f*x]^2)/((a + b + b*Tan[e + f*x]^2)/(a + b))^p) + ((a + 2*b + a*Cos[2*(e +
f*x)])^p*(Sec[e + f*x]^2)^p*((2*AppellF1[-1/2 - p, -1/2, -p, 1/2 - p, -Cot[e + f*x]^2, -(((a + b)*Cot[e + f*x]
^2)/b)]*Cot[e + f*x]*Sqrt[Sec[e + f*x]^2])/((1 + 2*p)*(1 + ((a + b)*Cot[e + f*x]^2)/b)^p*Sqrt[Csc[e + f*x]^2])
 + (4*(a + b)*p*AppellF1[-1/2 - p, -1/2, -p, 1/2 - p, -Cot[e + f*x]^2, -(((a + b)*Cot[e + f*x]^2)/b)]*Cot[e +
f*x]*(1 + ((a + b)*Cot[e + f*x]^2)/b)^(-1 - p)*Sqrt[Csc[e + f*x]^2]*Sqrt[Sec[e + f*x]^2])/(b*(1 + 2*p)) + (2*(
(-2*(a + b)*(-1/2 - p)*p*AppellF1[1/2 - p, -1/2, 1 - p, 3/2 - p, -Cot[e + f*x]^2, -(((a + b)*Cot[e + f*x]^2)/b
)]*Cot[e + f*x]*Csc[e + f*x]^2)/(b*(1/2 - p)) - ((-1/2 - p)*AppellF1[1/2 - p, 1/2, -p, 3/2 - p, -Cot[e + f*x]^
2, -(((a + b)*Cot[e + f*x]^2)/b)]*Cot[e + f*x]*Csc[e + f*x]^2)/(1/2 - p))*Sqrt[Sec[e + f*x]^2])/((1 + 2*p)*(1
+ ((a + b)*Cot[e + f*x]^2)/b)^p*Sqrt[Csc[e + f*x]^2]) + (2*AppellF1[-1/2 - p, -1/2, -p, 1/2 - p, -Cot[e + f*x]
^2, -(((a + b)*Cot[e + f*x]^2)/b)]*Sqrt[Sec[e + f*x]^2]*Tan[e + f*x])/((1 + 2*p)*(1 + ((a + b)*Cot[e + f*x]^2)
/b)^p*Sqrt[Csc[e + f*x]^2]) + (2*b*p*AppellF1[1, 1/2, -p, 2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*S
ec[e + f*x]^2*Tan[e + f*x]^3*((a + b + b*Tan[e + f*x]^2)/(a + b))^(-1 - p))/(a + b) - (2*AppellF1[1, 1/2, -p,
2, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Sec[e + f*x]^2*Tan[e + f*x])/((a + b + b*Tan[e + f*x]^2)/(a
 + b))^p - (Tan[e + f*x]^2*((b*p*AppellF1[2, 1/2, 1 - p, 3, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*Se
c[e + f*x]^2*Tan[e + f*x])/(a + b) - (AppellF1[2, 3/2, -p, 3, -Tan[e + f*x]^2, -((b*Tan[e + f*x]^2)/(a + b))]*
Sec[e + f*x]^2*Tan[e + f*x])/2))/((a + b + b*Tan[e + f*x]^2)/(a + b))^p))/2))

________________________________________________________________________________________

Maple [F]  time = 0.383, size = 0, normalized size = 0. \begin{align*} \int \csc \left ( fx+e \right ) \left ( a+b \left ( \sec \left ( fx+e \right ) \right ) ^{2} \right ) ^{p}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)*(a+b*sec(f*x+e)^2)^p,x)

[Out]

int(csc(f*x+e)*(a+b*sec(f*x+e)^2)^p,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \csc \left (f x + e\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)*(a+b*sec(f*x+e)^2)^p,x, algorithm="maxima")

[Out]

integrate((b*sec(f*x + e)^2 + a)^p*csc(f*x + e), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \csc \left (f x + e\right ), x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)*(a+b*sec(f*x+e)^2)^p,x, algorithm="fricas")

[Out]

integral((b*sec(f*x + e)^2 + a)^p*csc(f*x + e), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)*(a+b*sec(f*x+e)**2)**p,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (f x + e\right )^{2} + a\right )}^{p} \csc \left (f x + e\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)*(a+b*sec(f*x+e)^2)^p,x, algorithm="giac")

[Out]

integrate((b*sec(f*x + e)^2 + a)^p*csc(f*x + e), x)